#ifndef WOB_H
#define WOB_H

#include <CL/cl.h>
#include <stdio.h>
#include <stdlib.h>
#include <wtypes.h>
#include <Strsafe.h>
#include <string.h>
#include <string>
#include <vector>
#include <omp.h>
#include <cstdlib>
#include <fstream>
#include <time.h>	
#include <math.h>
#include <conio.h>
#include <iostream>
#include "MyOCL.h"
using namespace std;

class WOB : public MyOCL
{
private:
	// capacitance of the unit cube
	cl_float capacitance;
	// count randomize number
	cl_int countN;
	// the radius of enclosing sphere
	cl_int radius;

	// Timer CPU
	double startTimeCPU;
	double endTimeCPU;

	// ----------------------------------------------------------
	// GPU
	// ----------------------------------------------------------
	// capacitance of the unit cube
	cl_float capacitanceGPU;
	

	// Timer GPU
	double startTimeGPU;
	double endTimeGPU;

	// Initialize CL 
	void initializeCL(void);
	// Initialize Host application 
	void initializeHost(void);
	// releases OpenCL resources
	void cleanupCL(void);
	// releases program's resources 
	void cleanupHost(void);


public:
	WOB(cl_int r1);
	~WOB();

	cl_float getCapacitance() {return capacitance;}

	cl_float searchCapacitanceCPU();

	double getTimeCPU() {return endTimeCPU - startTimeCPU;}
	double getTimeGPU() {return endTimeGPU - startTimeGPU;}
	void runCLKernels(void);
};

#endif // WOB_H